home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-14 / combi113.zip / README < prev    next >
Text File  |  1993-05-03  |  23KB  |  558 lines

  1.                         COMBI-Disk -
  2.                    RAM disk & disk cache
  3.  
  4.  
  5. Preface.
  6. --------
  7.  
  8.         - Why don't You use disk cache?
  9.         - I'd like, but memory constrains prevent me from using it:
  10.           I need more memory for  RAM disk.
  11. -----
  12.         - Why don't You use RAM disk?
  13.         - I'd like, but memory constrains prevent me from using it:
  14.           I need more memory for disk cache.
  15. -----
  16.         - Why don't You use RAM disk or disk cache?
  17.         - I'd like, but some of my applications require free extended
  18.           memory.
  19.  
  20. If one of these answers is Yours then COMBI-Disk is for You!
  21. You may hit THREE targets with a single shot - installing COMBI-Disk
  22. You get a RAM disk and a Disk-Cache and free XMS memory at the same
  23. time in the SAME area of extended memory!
  24.  
  25. When You install COMBI-Disk You specify amount of extended memory for
  26. it and You get a RAM disk of the specified size and a Disk-Cache of the
  27. same size. You may also specify amount of memory which should be
  28. released if some program requires it. Then when You work with Your PC,
  29. You enjoy COMBI's disk cache which is not worse than others (I hope it
  30. is better).  Suppose now that You start a program which needs a disk
  31. buffer for temporary storage and tell it to use RAM disk.  Then the
  32. program may use the whole amount of the RAM disk's space (though
  33. contracting the size of cache).  When it terminates and deletes
  34. temporary files You get back your cache buffer!  If a program requests
  35. XMS memory COMBI-disk may loan some of its memory to the program (if it
  36. has the requested amount free of RAM disk data). When the program
  37. releases the memory COMBI-disk reallocates it back.
  38.  
  39. I've been reported of 25% increase in compilation speed with COMBI
  40. compared to that for other cache programs. Sure, the starting conditions
  41. were different: with COMBI the source files were put on the RAM disk
  42. and the compiler (BCX.EXE) used XMS memory released by COMBI. In fact,
  43. one could, probably, achieve the same performance installing a RAM disk
  44. and setting cache size so that there is enough free XMS not used by either
  45. RAM disk or disk cache. But how would one calculate the optimal size of
  46. RAM disk and free XMS? And that is not very convenient to reconfigure
  47. (and reboot) system depending on what task are You going to deal with.
  48.  
  49.  
  50.  
  51. Applications.
  52. ------------
  53.  
  54. Some programs (e.g. compilers, word-processors etc.) need a buffer for
  55. temporary storage, and if the storage is RAM disk then their performance
  56. may be increased few times compared with the case of usage of hard disk
  57. instead. That's why You may sometimes need a RAM disk. But if You use
  58. standard RAM disk (Microsoft (C) RAMDRIVE.SYS or IBM (C) VDISK.SYS or any
  59. other) it often comes out that it stays empty most of the time though
  60. consuming Your extended (expanded) memory. That's why You may wish to
  61. give up using RAM disk or make it less in order to have more memory
  62. for disk cache which is always useful.
  63.  
  64. Moreover, some of programs can take advantage of XMS memory if it is
  65. available. That's why You may wish to give up using disk cache (though
  66. some of caches support memory reallocation without reinstallation).
  67.  
  68.                 Don't get disappointed!
  69.      COMBI-Disk
  70. is a nice solution of this problem! It uses a little more memory for
  71. RAM disk than is needed to keep all files written into it while all the
  72. remaining memory is used for cache.  You need not bother to make this
  73. memory larger - just WRITE Your file(s) into RAM disk, all the rest it
  74. does itself! You need not bother as well to contract RAM disk's size
  75. and increase cache size - just DELETE files from RAM disk and all the
  76. released memory will be used for cache!  You need not bother to
  77. reconfigure Your system when You need some free XMS memory - COMBI-disk
  78. takes care of that itself (however, if You forgot to specify amount of
  79. memory COMBI-disk would release, You have to run COMBI control program
  80. to tell COMBI-disk that You need certain amount of free XMS memory).
  81.  
  82.  
  83. System requirements.
  84. -------------------
  85.  
  86.         1. 80x86 based machine with extended memory.
  87.         2. DOS 3.30+.
  88.         3. Extended memory manager which supports XMS 2.0 specifications
  89.        which supports "reallocate XMS" function (Microsoft (C) HIMEM.SYS
  90.            ver 2.77+ or Quarterdeck (C) QEMM.SYS will do, as well as most
  91.            others).
  92.  
  93.  
  94. General features.
  95. ----------------
  96.  
  97.         - COMBI-disk may use up to 16 Mbytes of extended (XMS) memory.
  98.         - Up to 8 physical hard disks are supported.
  99.         - Starting from version 1.00 background write caching is
  100.           supported.
  101.         - Automatic reallocation of XMS memory.
  102.         - Variable size of cache block (memory allocation unit) -
  103.           from 1 to 8 disk sectors (512 bytes each).
  104.         - IOCtl interface to control program.
  105.         - HMA may be used for COMBI-disk data tables (even when MS-DOS
  106.           5.0 is loaded into HMA and under DR-DOS 6.0 as well).
  107.  
  108.  
  109. Installation.
  110. ------------
  111.  
  112. WARNING! It is recommended to make backup of hard disk before
  113. installation of COMBI-disk (as well as any other disk cache program).
  114.  
  115. COMBI-Disk installation process is quite straightforward, although it
  116. requires some tweaking with the contents of your CONFIG.SYS file. Copy
  117. COMBI.SYS into Your hard-disk and insert the following line into Your
  118. CONFIG.SYS file
  119.  
  120.         DEVICE=[drive:][path]COMBI.SYS [<parameters>]
  121.  
  122. The proper place in CONFIG.SYS would be after all memory managers,
  123. after disk managers and if possible before disk write-protection
  124. programs (otherwise You should not turn on write caching).
  125.  
  126. The <parameters> are all optional and include:
  127.  
  128. [<buff_size> [<rls_size>]] [/V [<RAMd_parms>]] [/C [<cache_parms]] [/H] [/Q]
  129.  
  130.  
  131.  
  132. <buff_size> -  the amount of XMS memory (Kbytes) You want to use for
  133.                COMBI-Disk. Minimum  is 128K, maximum is about 14000K.
  134.                If it is omitted then all available memory is default.
  135.                There is no harm if You specify more memory than really is
  136.                available - then COMBI-disk uses all available memory.
  137.  
  138. <rls_size>  -  maximum number of XMS memory (Kbytes) COMBI-disk should
  139.                release when it is requested. Default is all available.
  140.            If You want to ensure that there always is some memory
  141.            available for RAM disk You may specify this size to be
  142.            less than COMBI allocates for its buffers. Note, if You
  143.            want to specify this number You should also specify
  144.            <buff_size>.
  145.  
  146. /V          -  means that RAM disk parameters follow.
  147.  
  148. <RAMd_parms> - RAM disk parameters may be the following:
  149.  
  150. F:<disk_size>- specifies formatted size of RAM disk. By default COMBI
  151.                creates RAM disk of the size (<buff_size> - <min_cache>)
  152.            Kbytes. But You may specify a less size.
  153.  
  154. R:<root_num> - number of entries in root directory of RAM disk. Default
  155.                is 64. If You encounter DOS error "can't create file..."
  156.                when number of file in root directory is 63 (plus one
  157.                for volume label) then try specifying, say, R:128.
  158.  
  159. S:<sect_size>- sector size for RAM disk - 256 or 512 bytes, default is
  160.                512 bytes. Using 256 bytes sectors may sometimes save
  161.                some space on RAM disk but this is effective only if
  162.                RAM disk size is less than 1 Mbyte.
  163.  
  164. N           -  tells RAM disk not to return 'sector not found' error
  165.                (see also below). This setting may be always changed by
  166.                control program.
  167.  
  168. /C          -  means that cache parameters follow.
  169.  
  170. <cache_parms>- cache parameters may be the following:
  171.  
  172. M:<min_cache>- specifies minimum cache size (Kbytes). This reduces size
  173.                of RAM disk but guarantees that specified amount of
  174.                memory will be always allocated to cache. Default is 0.
  175.  
  176. U:<block_sec>- number of sectors per cache block (from 1 to 8). Using
  177.                smaller blocks may result in more effective usage of
  178.                memory (if You have not much of it) but leads to slower
  179.                operation for large read/write transfers. Default is 8.
  180.  
  181. O           -  tells COMBI-disk to turn OFF disk cache after
  182.                installation. Cache may be turned ON at any time by
  183.                control program. This may be useful for testing period
  184.            if You have some problems.
  185.  
  186. B           -  enable background disk writes. By default background
  187.                writes are set off on installation. May be changed at
  188.                any time by control program.
  189.  
  190. I           -  forces COMBI's disk cache to start background writing
  191.                immediately. By default background writing starts within
  192.                18 timer ticks (approx. 1 sec.) after last access to hard
  193.                disk. This is in effect only when background writing is
  194.                enabled. I admit that sometimes it may be more safe to
  195.            start writing immediately rather than wait a second, but
  196.            as a rule that slows down cache performance, especially
  197.            for large transfers.
  198.  
  199. /H          -  tells COMBI-disk to use HMA for data tables.
  200.  
  201. /Q          -  tells COMBI-disk not to display installation parameters.
  202.  
  203. In short, recommended installation parameters for best performance are:
  204.  
  205. DEVICE=<drive>:<path>COMBI.SYS /C B /H
  206.  
  207. In this case COMBI allocates all available XMS memory but will release
  208. almost all when it is requested, RAM disk is created of maximum size
  209. and write caching is enabled. (You may use explicitly set COMBI's buffer
  210. size and other numbers if You or don't want to spend all XMS for COMBI
  211. or want to ensure that there is always some memory available for RAM disk.)
  212.  
  213. Note:   Minus ('-') may be used everywhere in command line instead of
  214.         slash ('/'), and equal sign ('=') instead of colon (':'). Case
  215.         of the letters is insignificant. Spaces are required only after
  216.         COMBI.SYS name and between two adjacent numbers.
  217.  
  218.  
  219. Installation messages.
  220. ---------------------
  221.  
  222.                 COMBI-Disk: RAM disk & disk cache
  223.         Copyright 1991-1993 by Vadim V. Vlasov, Moscow, Russia,
  224.                         Version 1.13
  225.  
  226.              - This banner always appears and tells You that
  227.                COMBI-disk is being installed.
  228.  
  229.  
  230. ERROR: Incorrect DOS version!
  231.  
  232.              - DOS version must be above or equal to 3.30 and below or
  233.            equal to 6.00.
  234.  
  235. ERROR: Invalid parameter!
  236.  
  237.              - An invalid parameter appears in command line or some
  238.                parameter is specified in improper place.
  239.  
  240. ERROR: Extended Memory Manager not present!
  241.  
  242.              - COMBI-Disk needs XMM driver. Check that Your XMM driver
  243.                is installed before COMBI-Disk.
  244.  
  245. ERROR: No extended memory available!
  246.  
  247.              - All Your extended memory is used by some other programs
  248.                or less than 128K is available.
  249.  
  250. ERROR: Can't allocate extended memory!
  251.  
  252.              - An error encountered when COMBI-Disk tried to allocate
  253.                extended memory.
  254.  
  255. ERROR: Not enough memory!
  256.  
  257.              - Not enough memory for COMBI-disk's code and data. This
  258.                is almost impossible.
  259.  
  260. ERROR: No hard drives on system(?!)
  261.  
  262.              - COMBI-disk can't determine presence of hard disk(s) and
  263.                its (their) parameter(s).
  264.  
  265. WARNING: Inconsistent parameters.
  266.  
  267.              - Some of numeric parameters conflict with each other. As
  268.                a rule this is not fatal - some of the numbers will be
  269.                adjusted.
  270.  
  271. WARNING: Can't hook XMS driver entry chain.
  272.  
  273.              - COMBI-disk won't intercept XMS (re)allocation calls and
  274.                hence automatic reallocation of COMBI's memory is
  275.                disabled. However, You may change amount of used XMS
  276.                memory by control program.
  277.  
  278. WARNING: Not enough HMA for data tables or HMA not available.
  279.  
  280.              - COMBI-disk will use more low memory for its data tables.
  281.                (For 3 Mbytes buffer it is about 12K)
  282.  
  283. If "ERROR:..." message is displayed COMBI-disk aborts installation.
  284.  
  285. If the installation is successful a box is displayed (if it is not
  286. suppressed by /Q switch) which summarizes installation options and
  287. announces how much memory is used by COMBI-disk.
  288.  
  289. Note. Some of numeric parameters specified in command line may be
  290. adjusted by COMBI-disk.
  291.  
  292.  
  293. Testing.
  294. -------
  295.  
  296. A simple test program CMBTEST.COM is supplied with the package. It
  297. writes randomly to few files, deletes some of them etc. Its objective
  298. is to convince You that memory allocation strategy used by COMBI-disk
  299. is reliable. It may also be used to test write caching reliability.
  300.  
  301. Usage:
  302.         CMBTEST <dirname> [<options>]
  303. where <dirname> is name of directory (or drive) where CMBTEST  will
  304. write the files - it may be a directory on a hard drive or COMBI's RAM
  305. disk. <options> may be used if You want to run multiple test series.
  306. (For more details see the source code CMBTEST.C) I suggest You to
  307. run
  308.         CMBTEST <COMBI's_RAM_drive_letter>:
  309. and then
  310.         CMBTEST <some_temporary_directory_on_hard_disk>
  311. and compare the resulted files:
  312.         COMP <path1>*.* <path2>
  313. (<path1(2)> - pathnames of target directories). If all the "files
  314. compare O'K" then there is no error and You may delete the files or
  315. repeat the test with other options. Note: options must be the same for
  316. both runs otherwise the files will be different.
  317.  
  318. You may also change the program if You have any new ideas how to
  319. improve the test.
  320.  
  321.  
  322. Control of operation.
  323. --------------------
  324.  
  325. A control program COMBI.COM is supplied with the package. It allows
  326. You to change cache or RAM disk options or change memory setting
  327. without reconfiguring and rebooting. It also displays some statistic
  328. information which may be helpful: current options, number of read/write
  329. accesses to hard/RAM disk etc.
  330.  
  331. Usage:
  332.         COMBI [+/-<mem_change>] [<options>...]
  333. where
  334.  
  335. <mem_change> -  amount of memory (Kbytes) to add to or release from
  336.                 COMBI-disk. If memory can't be reallocated by specified
  337.                 amount COMBI will report that.
  338.  
  339. <options>    -  a sequence of any of letters 'i', 'o', 'b', 'z', 'f',
  340.                 'r', 'n' which may be separated by spaces and/or
  341.                 followed by '-' which reverses the meaning of the
  342.                 option. Case of the letters is insignificant.
  343.  
  344. i            -  turn off delayed writing (write immediately) ('i-'
  345.                 turns delayed writing on),
  346.  
  347. o            -  turn cache on ('o-' - turn off),
  348.  
  349. b            -  enable background writing ('b-' - disable),
  350.  
  351. z            -  'freeze' cache - after freezing the sectors which are
  352.                 already in cache remain there (are not purged) while
  353.                 no new sectors are copied to cache. This may be useful
  354.                 e.g. if You have small cache and want to keep there
  355.                 only FAT and directories, then You might run "CHKDSK"
  356.                 (which reads the whole FAT and all the directories)
  357.                 and then "COMBI z". 'z-' returns cache to normal
  358.                 operation.
  359.  
  360. f            -  fix memory settings - this disables automatic
  361.                 reallocation of XMS memory to other programs.
  362.  
  363. n            -  tells RAM disk not to return 'sector not found' error.
  364.  
  365. r            -  resets all statistic counters (there is no 'r-'
  366.                 option).
  367.  
  368. "COMBI ?" displays quick help on parameters usage.
  369.  
  370. Source code COMBI.C and header file IOCTL.H are supplied if You wish
  371. to implement some control over COMBI-disk into Your applications.
  372.  
  373.  
  374. Compatibility.
  375. -------------
  376.  
  377. COMBI-disk is compatible with:
  378.  
  379.   - MS-DOS versions 3.30 - 5.00 (if it were not it would be useless);
  380.     as regards MS-DOS 6.00 it has not been tested, however, I suppose
  381.     that there are no crucial changes to make COMBI incompatible;
  382.  
  383.   - DR-DOS version 6.00 (version 5.00 was not tested);
  384.  
  385.   - Borland's Turbo-debugger TD386 (TD386 uses XMS memory released by
  386.     COMBI-disk);
  387.  
  388.   - MS-WINDOWS;
  389.  
  390.   - DJGPP (GNU C++ compiler for DOS and GO32 DOS extender by
  391.     DJDelorie), however LD (DJGPP linker) often runs into "Sector not
  392.     found" error if some of object files are on RAM disk, usage of "N"
  393.     installation option or "COMBI n" solves the problem;
  394.  
  395.   - Stacker and SuperStor disk compression drivers.
  396.  
  397.   - many other programs.
  398.  
  399. COMBI-disk is incompatible with:
  400.  
  401.   - Maybe some multitasking programs (please report me about any
  402.     incompatibilities).
  403.  
  404.   - Windows can't start in enhanced mode under QEMM memory manager. There
  405.     are two reasons: first, WIN386.EXE uses other than XMS call way to
  406.     allocate memory. This may be solved by running 'COMBI -1000' before
  407.     starting Windows and 'COMBI +1000' after (put it into WIN.BAT file).
  408.     Second, QEMM's way of handling A20 line conflicts with that of Windows,
  409.     so, if COMBI uses HMA the system often hangs during Windows startup.
  410.     I know a way to fix this problem but it looks so ugly to me that I
  411.     prefer not to do that but rather recommend not to use HMA for COMBI
  412.     if You are going to run Windows under QEMM memory manager.
  413.  
  414.  
  415. Possible errors.
  416. ---------------
  417.  
  418. Sector not found - You tried to read a sector which does not contain
  419.         any valid data (You haven't written into it yet or have  already
  420.         deleted the file that occupied this sector). This never happens
  421.         with the majority of programs. However, for some programs this
  422.         occurs regularly. It is recommended to reply 'Ignore' to the
  423.         'Retry, Ignore, Fail?' DOS prompt. If You are sure that this
  424.         causes no errors You may specify option 'N' as one of
  425.         installation parameters (or run "COMBI n"). In this case the
  426.         'not found' sectors are also not read, but error status is not
  427.         returned by COMBI-disk.
  428.  
  429. Warning! Once a file is deleted from RAM disk, it might not be correctly
  430. unerased by any means. It's data is lost immediately.
  431.  
  432. Data error writing drive <RAM_disk> - this may happen when some XMS
  433.         memory has been loaned to a program and that program also tries
  434.         to write some files to RAM disk which has not enough memory for
  435.         that. Suggested action - specify less amount of memory which
  436.         COMBI-disk should release for other programs or configure the
  437.         program to use other drive for temporary files.
  438.  
  439.         The same problem may arise if a program which used XMS memory
  440.         terminated (or has been aborted) but not released memory. In
  441.         this case COMBI-disk can't reallocate XMS memory back to the
  442.         full size. It continues working but won't use the full buffer
  443.         size for cache or RAM disk data.
  444.  
  445.         Other errors indicate that either COMBI-Disk internal data tables
  446. are corrupt (e.g. overwritten by other program) or error in XMM driver
  447. encountered.
  448.  
  449.  
  450. Some hints.
  451. ----------
  452.  
  453. "TEMP" environment variable is used by MS-DOS as a directory for
  454. temporary files, in particular when COMMAND.COM creates pipes
  455. (e.g. "dir | sort | more" etc.).
  456.  
  457. "TMP" environment variable is used by many programs (e.g. Microsoft
  458. compilers) as a directory for temporary files. So, setting TEMP and TMP
  459. in AUTOEXEC.BAT to point to Your RAM disk may improve Your system
  460. performance.
  461.  
  462. Many other programs also can take advantage of RAM disk - see their
  463. manuals and configure them.
  464.  
  465. Using write caching is not very dangerous as it might seem. In fact,
  466. when COMBI-disk is configured for background writing it often takes
  467. less time to finish writing to hard disk than without write caching.
  468. Moreover, while data is being written to disk You program continues
  469. running and that saves You a lot of processor time. Enabling delayed
  470. writing as a rule decreases number of hard disk accesses and hard disk
  471. head motions. However, if You start a program that hooks INT 08 (timer)
  472. and does not pass control to former INT 08 handlers (some games often
  473. do that) it would be better if You disable delayed writes ("COMBI i")
  474. before starting such a program and enable it later ("COMBI i-").
  475.  
  476. Freezing cache ("COMBI z") when it contains certain data may be useful
  477. if COMBI-disk's buffer size is relatively small. E.g. Freezing cache
  478. after "CHKDSK" results in faster search for a file or directory change,
  479. freezing cache after run of some program (whose size is less than cache
  480. size) results in faster loading of that program on future runs (while
  481. other programs operate as without cache).
  482.  
  483.  
  484. The name of the game.
  485. --------------------
  486.  
  487. The name "COMBI" originates from "COMBInation" of such incompatible
  488. (maybe even contradicting) at the first sight programs: RAM disk and
  489. disk cache.
  490.  
  491.  
  492. History information.
  493. -------------------
  494.  
  495. Version 1.13 (03 May 1993): see the file WHATSNEW.113
  496.  
  497. Version 1.10 (01 Dec 1992):
  498.  
  499. Few bugs of version 1.00 were fixed. These include:
  500.   - "Not enough memory" error under DOS other than MS v.5.00;
  501.   - Very poor performance (worse than without cache) if VERIFY is set ON.
  502.  
  503. Now COMBI may use HMA under DR-DOS as well.
  504. Performance of cache improved.
  505. Write delay time increased from 5 to 18 clock ticks (1 sec).
  506. Added Ctrl-Alt-Del handling to flush cache before reboot.
  507. COMBI control program renamed from "CMBCTL" (which was hardly typeable
  508. and hardly memorizable) to "COMBI", ANSI sequences are used to provide
  509. color output.
  510.  
  511. Version 1.00 (08 Aug 1992):
  512.  
  513. A lot of new features added compared to prior versions: write
  514. caching, reallocation of XMS memory, IOCtl interface to control
  515. operation of COMBI-disk etc. Most of the code has been completely
  516. rewritten. However, the main idea of dynamical memory reallocation
  517. between RAM disk and disk cache remained the same.
  518.  
  519. Versions 0.10 (13 Aug 1991) - 0.31 (15 Feb 1992):
  520.  
  521. These were mainly trial versions to ensure reliability of the idea of
  522. dynamical reallocation of memory for RAM disk. 
  523.  
  524. The very first beta version of COMBI-Disk was version 0.01 (24 Jun 1991).
  525.  
  526.  
  527. Future.
  528. ------
  529.  
  530. Here are some of my ideas about future development of COMBI:
  531.  
  532.   - Caching of floppy disks;
  533.  
  534.   - Special version for 80386 processor (probably, usage of 80386
  535.     instructions may increase performance);
  536.  
  537.   - As regards usage of EMS instead of XMS, I'm not sure that it would be
  538.     an advantage. However, if there is enough interest in that I'll implement
  539.     EMS support;
  540.  
  541.   - Further improvement of performance.
  542.  
  543.  
  544. ----------------
  545. If You have any questions, comments or find out any problems with
  546. COMBI-disk usage please contact:
  547.  
  548.         Vadim V. Vlasov,
  549.         Inst. for Nuclear Research of Russian Acad. Sci.,
  550.         60th October Anniversary prospect, 7a,
  551.         117312, Moscow, Russia.
  552.  
  553.         phone:    7-095-133-6533
  554.  
  555.         Internet: vvlasov@inucres.msk.su
  556.  
  557.  
  558.